Creates a Rubric object, which may then be used to be added to an Interaction.Rubrics list.
Parent Type: LearningDataModel
Namespace: Microsoft.LearningComponents.DataModel
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public Rubric CreateRubric () |
A new Rubric object associated with this LearningDataModel.
| Exception type | Condition |
| InvalidOperationException | Thrown if this LearningDataModel object cannot be written to. |
The following example demonstrates creating a new rubric and adding it to an Interaction.Rubrics collection.
| C# |
LearningSession session = ... ; // get LearningSession object Interaction i = session.CurrentActivityDataModel.CreateInteraction(); i.Id = "interaction1"; // A unique identifier is required before this is added to the list i.InteractionType = InteractionType.TrueFalse; Rubric r = session.CurrentActivityDataModel.CreateRubric(); r.Points = 3; i.Rubrics.Add(r); session.CurrentActivityDataModel.Interactions.Add(i); |